package cn.dmp.util

import com.typesafe.config.{Config, ConfigFactory}
import redis.clients.jedis.{Jedis, JedisPool}

/**
  * Created by Administrator on 2018/4/25.
  */
object JedisPools {

  private val load = ConfigFactory.load()
  private val redisHost = load.getString("rhost")
  private val redisPost = load.getInt("rpost")

  private lazy val jedis = new JedisPool(redisHost,redisPost)

  //获取连接
  def getJedis:Jedis=jedis.getResource

}
